/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.view.orderView;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import com.ruipengkj.view.base.BasePanel;

public class OrderDetailPanel2 extends BasePanel {

	/**
	 * 在线订单
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * @param args
	 */
	private JTextField orderNumTF; //订单编号
	private JTextField userNumTF; //用户编号
	private JTextField orderStateTF; //订单状态//
	private JTextField payTF; //付款方式
	private JTextField deliveryTF; //配送方式
	private JTextField endTF; //结束方式 
	private JTextField totalMoneyTF; //总金额
	private JTextField mustMonetTF; //应支付金额
	private JTextField hasMonetTF; //已支付金额
	private JTextField favorableMoneyTF; //优惠金额
	private JTextField payNumTF; //支付单编号
	private JTextField enterpriseTypeTF; //定单类型（企业/个人）
	private JTextField CommentsStateTF; //评价状态
	private JTextField CancelReasonTF; //取消原因
	private JTextField orderNoteTF; //订单备注
	private JTextField visitSourceTF; //访问来源
	private JTextField orderTypeTF; //订单类型（零售/批发）
	private JTextField salesPeopleTF; //销售人
	private JTextField employeesTF; //操作人
	private JTextField operationTimeTF; //操作时间
	private JTextField billsTypeTF; //票据类型
	private JTextField invoiceNumTF; //发票号
	private JTextField contactTF; //联系人
	private JTextField contactPhoneTF; //联系电话
	private JTextField contactAddrTF; //联系地址
	private JTextField zipCodeTF; //邮编
	private JTextField provinceTF; //省
	private JTextField cityTF; //市
	private JTextField areaTF; //区
	private JTextField telTF; //移动电话
	private JTextField addrTypeTF; //地址类型
	private JTextField streetTF; //街道
	private JTextField buildingTF; //楼宇
	private JTextField priorityTF; //优先级
	private JTextField latiudeTF; //纬度
	private JTextField longitudeTF; //经度
	private JTextField authenticationTF; //是否认证
	private JTextField TransactionNumTF; //交易次数
	
	private JButton backButton;//返回
	private JButton printButton;//打印
	private JButton cancelOrder;//取消订单
	
	public OrderDetailPanel2() {
		this.setLayout(new BorderLayout());
		componentsInit();
		init();
	}
	private void componentsInit() {
		favorableMoneyTF = new JTextField("", 10);
		TransactionNumTF = new JTextField("", 10);
		orderNumTF = new JTextField("", 10);
		userNumTF = new JTextField("", 10);
		orderStateTF = new JTextField("", 10);
		payTF = new JTextField("", 10);
		deliveryTF = new JTextField("", 10);
		endTF = new JTextField("", 10);
		totalMoneyTF = new JTextField("", 10);
		mustMonetTF = new JTextField("", 10);
		hasMonetTF = new JTextField("", 10);
		payNumTF = new JTextField("", 10);
		CancelReasonTF = new JTextField("", 10);
		orderNoteTF = new JTextField("", 10);
		visitSourceTF = new JTextField("", 10);
		CommentsStateTF = new JTextField("", 10);
		enterpriseTypeTF = new JTextField("", 10);
		orderTypeTF = new JTextField("", 10);
		salesPeopleTF = new JTextField("", 10);
		employeesTF = new JTextField("", 10);
		operationTimeTF = new JTextField("", 10);
		billsTypeTF = new JTextField("", 10);
		invoiceNumTF = new JTextField("", 10);
		contactTF = new JTextField("", 10);
		contactPhoneTF = new JTextField("", 10);
		contactAddrTF = new JTextField("", 10);
		zipCodeTF = new JTextField("", 10);
		provinceTF = new JTextField("", 10);
		cityTF = new JTextField("", 10);
		areaTF = new JTextField("", 10);
		telTF = new JTextField("", 10);
		addrTypeTF = new JTextField("", 10);
		streetTF = new JTextField("", 10);
		buildingTF = new JTextField("", 10);
		priorityTF = new JTextField("", 10);
		latiudeTF = new JTextField("", 10);
		longitudeTF = new JTextField("", 10);
		authenticationTF = new JTextField("", 10);
		
		backButton = new JButton("返回");//返回
		printButton = new JButton("打印");//打印
		cancelOrder = new JButton("取消订单");//取消订单
	}
	
	private JLabel newLabel(String str, int x, int y, int width, int height) {
		JLabel jlb = new JLabel(str);
		jlb.setBounds(x, y, width, height);
		return jlb;
	}
	
	private JTextField setCoordinates(JTextField jtf, int x, int y, int width, int height) {
		jtf.setBounds(x, y, width, height);
		return jtf;
	}
	private void init() {
		JPanel p1 = new JPanel(null);
		p1.add(newLabel("订单编号", 10, 10, 100, 25));		p1.add(setCoordinates(orderNumTF, 76, 10, 100, 25));
		p1.add(newLabel("用户编号", 210, 10, 100, 25));		p1.add(setCoordinates(userNumTF, 276, 10, 100, 25));
		p1.add(newLabel("订单状态", 410, 10, 100, 25));		p1.add(setCoordinates(orderStateTF, 476, 10, 100, 25));
		p1.add(newLabel("付款方式", 610, 10, 100, 25));		p1.add(setCoordinates(payTF, 676, 10, 100, 25));
		p1.add(newLabel("配送方式", 10, 40, 100, 25));		p1.add(setCoordinates(deliveryTF, 76, 40, 100, 25));
		p1.add(newLabel("结束方式", 210, 40, 100, 25));		p1.add(setCoordinates(endTF, 276, 40, 100, 25));
		p1.add(newLabel("总金额", 410, 40, 100, 25));		p1.add(setCoordinates(totalMoneyTF, 476, 40, 100, 25));
		p1.add(newLabel("应支付金额", 610, 40, 100, 25));	p1.add(setCoordinates(mustMonetTF, 676, 40, 100, 25));
		p1.add(newLabel("已支付金额", 10, 70, 100, 25));		p1.add(setCoordinates(hasMonetTF, 76, 70, 100, 25));
		p1.add(newLabel("优惠金额", 210, 70, 100, 25));		p1.add(setCoordinates(favorableMoneyTF, 276, 70, 100, 25));
		p1.add(newLabel("支付单编号", 410, 70, 100, 25));	p1.add(setCoordinates(payNumTF, 476, 70, 100, 25));
		p1.add(newLabel("定单类型", 610, 70, 100, 25));		p1.add(setCoordinates(enterpriseTypeTF, 676, 70, 100, 25));
		p1.add(newLabel("评价状态", 10, 100, 100, 25));		p1.add(setCoordinates(CommentsStateTF, 76, 100, 100, 25));
		p1.add(newLabel("取消原因", 210, 100, 100, 25));		p1.add(setCoordinates(CancelReasonTF, 276, 100, 100, 25));
		p1.add(newLabel("订单备注", 410, 100, 100, 25));		p1.add(setCoordinates(orderNoteTF, 476, 100, 100, 25));
		p1.add(newLabel("访问来源", 610, 100, 100, 25));		p1.add(setCoordinates(visitSourceTF, 676, 100, 100, 25));
		p1.add(newLabel("订单类型", 10, 130, 100, 25));		p1.add(setCoordinates(orderTypeTF, 76, 130, 100, 25));
		p1.add(newLabel("销售人", 210, 130, 100, 25));		p1.add(setCoordinates(salesPeopleTF, 276, 130, 100, 25));
		p1.add(newLabel("操作人", 410, 130, 100, 25));		p1.add(setCoordinates(employeesTF, 476, 130, 100, 25));
		p1.add(newLabel("操作时间", 610, 130, 100, 25));		p1.add(setCoordinates(operationTimeTF, 676, 130, 100, 25));
		p1.add(newLabel("票据类型", 10, 160, 100, 25));		p1.add(setCoordinates(billsTypeTF, 76, 160, 100, 25));
		p1.add(newLabel("发票号", 210, 160, 100, 25));		p1.add(setCoordinates(invoiceNumTF, 276, 160, 100, 25));

		p1.add(newLabel("地址", 10, 190, 100, 25));	
		
		p1.add(newLabel("联系人", 10, 220, 100, 25));		p1.add(setCoordinates(contactTF, 76, 220, 100, 25));
		p1.add(newLabel("联系电话", 210, 220, 100, 25));		p1.add(setCoordinates(contactPhoneTF, 276, 220, 100, 25));
		p1.add(newLabel("联系地址", 410, 220, 100, 25));		p1.add(setCoordinates(contactAddrTF, 476, 220, 100, 25));
		p1.add(newLabel("邮编", 610, 220, 100, 25));			p1.add(setCoordinates(zipCodeTF, 676, 220, 100, 25));
		p1.add(newLabel("省", 10, 250, 100, 25));			p1.add(setCoordinates(provinceTF, 76, 250, 100, 25));
		p1.add(newLabel("市", 210, 250, 100, 25));			p1.add(setCoordinates(cityTF, 276, 250, 100, 25));
		p1.add(newLabel("区", 410, 250, 100, 25));			p1.add(setCoordinates(areaTF, 476, 250, 100, 25));
		p1.add(newLabel("移动电话", 610, 250, 100, 25));		p1.add(setCoordinates(telTF, 676, 250, 100, 25));
		p1.add(newLabel("地址类型", 10, 280, 100, 25));		p1.add(setCoordinates(addrTypeTF, 76, 280, 100, 25));
		p1.add(newLabel("街道", 210, 280, 100, 25));			p1.add(setCoordinates(streetTF, 276, 280, 100, 25));
		p1.add(newLabel("楼宇", 410, 280, 100, 25));			p1.add(setCoordinates(buildingTF, 476, 280, 100, 25));
		p1.add(newLabel("优先级", 610, 280, 100, 25));		p1.add(setCoordinates(priorityTF, 676, 280, 100, 25));
		p1.add(newLabel("纬度", 10, 310, 100, 25));			p1.add(setCoordinates(latiudeTF, 76, 310, 100, 25));
		p1.add(newLabel("经度", 210, 310, 100, 25));			p1.add(setCoordinates(longitudeTF, 276, 310, 100, 25));
		p1.add(newLabel("是否认证", 410, 310, 100, 25));		p1.add(setCoordinates(authenticationTF, 476, 310, 100, 25));
		p1.add(newLabel("交易次数", 610, 310, 100, 25));		p1.add(setCoordinates(TransactionNumTF, 676, 310, 100, 25));
		
		JPanel p2 = new JPanel();
		p2.add(printButton);
		p2.add(cancelOrder);
		p2.add(backButton);
		
		this.add(new JLabel("订单明细"), BorderLayout.NORTH);
		this.add(p1, BorderLayout.CENTER);
		this.add(p2, BorderLayout.SOUTH);
	}
	@Override
	public void clear() {
		// TODO Auto-generated method stub
		
	}

}
